package com.ruoyi.web.controller.car;

import com.ruoyi.car.domain.Car;
import com.ruoyi.car.service.ICarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author zls
 * @date 2020-09-26 15:32:09
 * @description
 */
@Controller
@RequestMapping("/car/imp")
public class CarImportController {
    private static String prefix = "car/imp";
    static final String url_imp = "/car/imp";
    @Autowired
    private ICarService carService;

    @GetMapping("/{carId}/{id}")
    public String zhongliang(@PathVariable("id") Long id, @PathVariable("carId") Long carId, ModelMap mmap) {
        Car car = carService.selectCarById(carId);
        mmap.put("car", car);
        return prefix + "/imp";
    }
}
